package research.domain;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import research.entity.Entity;
import research.entity.EntityType;

public final class Research extends Entity {
	private String name;
	private Date date;
	private String description;
	private String idx;
	private String comment;
	private Application application;
	private Result result;
	private Set<Production> productions;
	private Set<Stabilizer> stabilizers;

	public Research() {
		super(EntityType.Research);
		productions = new HashSet<Production>();
	}

	@Override
	public String getDisplayName() {
		return this.getName();
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getIdx() {
		return idx;
	}

	public void setIdx(String idx) {
		this.idx = idx;
	}

	public String getComment() {
		return comment;
	}

	public void setComment(String coment) {
		this.comment = coment;
	}

	public Application getApplication() {
		return application;
	}

	public void setApplication(Application application) {
		this.application = application;
	}

	public Result getResult() {
		return result;
	}

	public void setResult(Result result) {
		this.result = result;
	}

	public Set<Production> getProductions() {
		return productions;
	}

	public void setProductions(Set<Production> production) {
		this.productions = production;
	}

	public static Research getNew() {
		Research res = new Research();
		res.setName("");
		res.setComment("");
		res.setDate(new Date());
		res.setDescription("");
		res.setIdx("");
		res.setApplication(null);
		res.setResult(null);
		return res;
	}

	public Set<Stabilizer> getStabilizers() {
		return stabilizers;
	}

	public void setStabilizers(Set<Stabilizer> stabilizers) {
		this.stabilizers = stabilizers;
	}

}
